package com.itc.system.domain.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itc.common.core.annotation.Excel;
import com.itc.common.core.annotation.Excel.ColumnType;
import com.itc.common.core.validate.Add;
import com.itc.common.core.validate.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 字典数据表Dto
 * @TableName sys_dict_data
 */
@Data
public class SysDictDataDto extends Page implements Serializable {
    /**
     * 字典编码
     */
    @ApiModelProperty(value = "字典编码")
    @Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
    @NotNull(message = "字典编码不能为空",groups = {Update.class})
    private Long dictCode;

    /**
     * 字典排序
     */
    @Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
    @ApiModelProperty(value = "字典排序",required = true)
    @NotNull(message = "字典排序不能为空",groups = {Add.class})
    private Integer dictSort;

    /**
     * 字典标签
     */
    @Excel(name = "字典标签")
    @ApiModelProperty(value = "字典标签",required = true)
    @NotBlank(message = "字典标签不能为空",groups = {Add.class})
    private String dictLabel;

    /**
     * 字典键值
     */
    @Excel(name = "字典键值")
    @ApiModelProperty(value = "字典键值",required = true)
    @NotBlank(message = "字典键值不能为空",groups = {Add.class})
    private String dictValue;

    /**
     * 字典类型
     */
    @Excel(name = "字典类型")
    @ApiModelProperty(value = "字典类型",required = true)
    @NotBlank(message = "字典类型不能为空",groups = {Add.class})
    private String dictType;

    /**
     * 样式属性（其他样式扩展）
     */
    @ApiModelProperty(value = "样式属性（其他样式扩展）")
    private String cssClass;

    /**
     * 表格回显样式
     */
    @ApiModelProperty(value = "表格回显样式")
    private String listClass;

    /**
     * 是否默认（Y是 N否）
     */
    @Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
    @ApiModelProperty(value = "是否默认（Y是 N否）")
    private String isDefault;

    /**
     * 状态（0正常 1停用）
     */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    @ApiModelProperty(value = "状态（0正常 1停用）")
    private String status;

    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private String createBy;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private String createTime;

    /**
     * 更新者
     */
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    private String updateTime;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}